﻿Ext.define("User", {
    extend: "Ext.data.Model",
    fields: [
        { name: "id", type: "int" },
        { name: "name", type: "string" },
        { name: "mail", type: "string" },
        { name: "age", type: "int" },
        { name: "isActive", type: "boolean", defaultValue: true }
    ],

    proxy: {
        type: "rest",
        url: "/users",
        reader: { type: "json", root: "records", totalProperty: "totalRecords" }
    }
});